//
//  SkidView.m
//  SkidViewController
//
//  Created by hs on 2017/7/12.
//  Copyright © 2017年 jiachen. All rights reserved.
//

#import "SkidView.h"

@interface SkidView ()

@property(nonatomic,strong)UIView *leftView;
@property(nonatomic,strong)UIView *rightView;
@property(nonatomic,strong)UIView *midView;
@property(nonatomic,strong)UIView *navibarView;

@end

@implementation SkidView

- (instancetype)initWithmidView:(UIView *)midview right:(UIView *)rightview left:(UIView *)leftview{
    
    if (self = [super init]) {
        
        [self drawUI];
    }
    return self;
}

- (void)drawUI{
    
    [self addSubview:self.leftView];
    [self addSubview:self.midView];
    [self addSubview:self.rightView];
    
}

- (UIView *)leftView{

    if (!_leftView) {
        
        _leftView = [[UIView alloc]initWithFrame:CGRectMake(0,0,180,self.frame.size.height)];
    }
    return _leftView;
}

- (UIView *)rightView{
    
    if (!_rightView) {
        _rightView = [[UIView alloc]initWithFrame:CGRectMake(self.frame.size.width,0,200,self.frame.size.height)];
    }
    return _rightView;
}

- (UIView *)midView{
    
    if (!_midView) {
        
    }
    return _midView;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
